using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;
namespace Adex{
    /// <summary>
    /// Strongly-typed collection for the VCommercialLog1 class.
    /// </summary>
    [Serializable]
    public partial class VCommercialLog1Collection : ReadOnlyList<VCommercialLog1, VCommercialLog1Collection>
    {        
        public VCommercialLog1Collection() {}
    }
    /// <summary>
    /// This is  Read-only wrapper class for the vCommercialLog1 view.
    /// </summary>
    [Serializable]
    public partial class VCommercialLog1 : ReadOnlyRecord<VCommercialLog1>, IReadOnlyRecord
    {
    
	    #region Default Settings
	    protected static void SetSQLProps() 
	    {
		    GetTableSchema();
	    }
	    #endregion
        #region Schema Accessor
	    public static TableSchema.Table Schema
        {
            get
            {
                if (BaseSchema == null)
                {
                    SetSQLProps();
                }
                return BaseSchema;
            }
        }
    	
        private static void GetTableSchema() 
        {
            if(!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("vCommercialLog1", TableType.View, DataService.GetInstance("Adex"));
                schema.Columns = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns
                
                TableSchema.TableColumn colvarMediaCode = new TableSchema.TableColumn(schema);
                colvarMediaCode.ColumnName = "MediaCode";
                colvarMediaCode.DataType = DbType.Int32;
                colvarMediaCode.MaxLength = 0;
                colvarMediaCode.AutoIncrement = false;
                colvarMediaCode.IsNullable = true;
                colvarMediaCode.IsPrimaryKey = false;
                colvarMediaCode.IsForeignKey = false;
                colvarMediaCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarMediaCode);
                
                TableSchema.TableColumn colvarRFDate = new TableSchema.TableColumn(schema);
                colvarRFDate.ColumnName = "RFDate";
                colvarRFDate.DataType = DbType.Int64;
                colvarRFDate.MaxLength = 0;
                colvarRFDate.AutoIncrement = false;
                colvarRFDate.IsNullable = true;
                colvarRFDate.IsPrimaryKey = false;
                colvarRFDate.IsForeignKey = false;
                colvarRFDate.IsReadOnly = false;
                
                schema.Columns.Add(colvarRFDate);
                
                TableSchema.TableColumn colvarTimeStart = new TableSchema.TableColumn(schema);
                colvarTimeStart.ColumnName = "TimeStart";
                colvarTimeStart.DataType = DbType.Int32;
                colvarTimeStart.MaxLength = 0;
                colvarTimeStart.AutoIncrement = false;
                colvarTimeStart.IsNullable = true;
                colvarTimeStart.IsPrimaryKey = false;
                colvarTimeStart.IsForeignKey = false;
                colvarTimeStart.IsReadOnly = false;
                
                schema.Columns.Add(colvarTimeStart);
                
                TableSchema.TableColumn colvarTimeEnd = new TableSchema.TableColumn(schema);
                colvarTimeEnd.ColumnName = "TimeEnd";
                colvarTimeEnd.DataType = DbType.Int32;
                colvarTimeEnd.MaxLength = 0;
                colvarTimeEnd.AutoIncrement = false;
                colvarTimeEnd.IsNullable = true;
                colvarTimeEnd.IsPrimaryKey = false;
                colvarTimeEnd.IsForeignKey = false;
                colvarTimeEnd.IsReadOnly = false;
                
                schema.Columns.Add(colvarTimeEnd);
                
                TableSchema.TableColumn colvarDuration = new TableSchema.TableColumn(schema);
                colvarDuration.ColumnName = "Duration";
                colvarDuration.DataType = DbType.Int32;
                colvarDuration.MaxLength = 0;
                colvarDuration.AutoIncrement = false;
                colvarDuration.IsNullable = true;
                colvarDuration.IsPrimaryKey = false;
                colvarDuration.IsForeignKey = false;
                colvarDuration.IsReadOnly = false;
                
                schema.Columns.Add(colvarDuration);
                
                TableSchema.TableColumn colvarProgramCode = new TableSchema.TableColumn(schema);
                colvarProgramCode.ColumnName = "ProgramCode";
                colvarProgramCode.DataType = DbType.Int32;
                colvarProgramCode.MaxLength = 0;
                colvarProgramCode.AutoIncrement = false;
                colvarProgramCode.IsNullable = true;
                colvarProgramCode.IsPrimaryKey = false;
                colvarProgramCode.IsForeignKey = false;
                colvarProgramCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarProgramCode);
                
                TableSchema.TableColumn colvarProgramName = new TableSchema.TableColumn(schema);
                colvarProgramName.ColumnName = "ProgramName";
                colvarProgramName.DataType = DbType.AnsiString;
                colvarProgramName.MaxLength = -1;
                colvarProgramName.AutoIncrement = false;
                colvarProgramName.IsNullable = true;
                colvarProgramName.IsPrimaryKey = false;
                colvarProgramName.IsForeignKey = false;
                colvarProgramName.IsReadOnly = false;
                
                schema.Columns.Add(colvarProgramName);
                
                TableSchema.TableColumn colvarTypology = new TableSchema.TableColumn(schema);
                colvarTypology.ColumnName = "Typology";
                colvarTypology.DataType = DbType.AnsiString;
                colvarTypology.MaxLength = 5;
                colvarTypology.AutoIncrement = false;
                colvarTypology.IsNullable = true;
                colvarTypology.IsPrimaryKey = false;
                colvarTypology.IsForeignKey = false;
                colvarTypology.IsReadOnly = false;
                
                schema.Columns.Add(colvarTypology);
                
                TableSchema.TableColumn colvarNominalCost = new TableSchema.TableColumn(schema);
                colvarNominalCost.ColumnName = "NominalCost";
                colvarNominalCost.DataType = DbType.Currency;
                colvarNominalCost.MaxLength = 0;
                colvarNominalCost.AutoIncrement = false;
                colvarNominalCost.IsNullable = true;
                colvarNominalCost.IsPrimaryKey = false;
                colvarNominalCost.IsForeignKey = false;
                colvarNominalCost.IsReadOnly = false;
                
                schema.Columns.Add(colvarNominalCost);
                
                TableSchema.TableColumn colvarRealCost = new TableSchema.TableColumn(schema);
                colvarRealCost.ColumnName = "RealCost";
                colvarRealCost.DataType = DbType.Currency;
                colvarRealCost.MaxLength = 0;
                colvarRealCost.AutoIncrement = false;
                colvarRealCost.IsNullable = true;
                colvarRealCost.IsPrimaryKey = false;
                colvarRealCost.IsForeignKey = false;
                colvarRealCost.IsReadOnly = false;
                
                schema.Columns.Add(colvarRealCost);
                
                TableSchema.TableColumn colvarPositionInBreak = new TableSchema.TableColumn(schema);
                colvarPositionInBreak.ColumnName = "PositionInBreak";
                colvarPositionInBreak.DataType = DbType.Int32;
                colvarPositionInBreak.MaxLength = 0;
                colvarPositionInBreak.AutoIncrement = false;
                colvarPositionInBreak.IsNullable = true;
                colvarPositionInBreak.IsPrimaryKey = false;
                colvarPositionInBreak.IsForeignKey = false;
                colvarPositionInBreak.IsReadOnly = false;
                
                schema.Columns.Add(colvarPositionInBreak);
                
                TableSchema.TableColumn colvarNumberOfSpotsInBreak = new TableSchema.TableColumn(schema);
                colvarNumberOfSpotsInBreak.ColumnName = "NumberOfSpotsInBreak";
                colvarNumberOfSpotsInBreak.DataType = DbType.String;
                colvarNumberOfSpotsInBreak.MaxLength = 50;
                colvarNumberOfSpotsInBreak.AutoIncrement = false;
                colvarNumberOfSpotsInBreak.IsNullable = true;
                colvarNumberOfSpotsInBreak.IsPrimaryKey = false;
                colvarNumberOfSpotsInBreak.IsForeignKey = false;
                colvarNumberOfSpotsInBreak.IsReadOnly = false;
                
                schema.Columns.Add(colvarNumberOfSpotsInBreak);
                
                TableSchema.TableColumn colvarTypeOfSpot = new TableSchema.TableColumn(schema);
                colvarTypeOfSpot.ColumnName = "TypeOfSpot";
                colvarTypeOfSpot.DataType = DbType.Int32;
                colvarTypeOfSpot.MaxLength = 0;
                colvarTypeOfSpot.AutoIncrement = false;
                colvarTypeOfSpot.IsNullable = true;
                colvarTypeOfSpot.IsPrimaryKey = false;
                colvarTypeOfSpot.IsForeignKey = false;
                colvarTypeOfSpot.IsReadOnly = false;
                
                schema.Columns.Add(colvarTypeOfSpot);
                
                TableSchema.TableColumn colvarTypeOfBuyCode = new TableSchema.TableColumn(schema);
                colvarTypeOfBuyCode.ColumnName = "TypeOfBuyCode";
                colvarTypeOfBuyCode.DataType = DbType.Int32;
                colvarTypeOfBuyCode.MaxLength = 0;
                colvarTypeOfBuyCode.AutoIncrement = false;
                colvarTypeOfBuyCode.IsNullable = true;
                colvarTypeOfBuyCode.IsPrimaryKey = false;
                colvarTypeOfBuyCode.IsForeignKey = false;
                colvarTypeOfBuyCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarTypeOfBuyCode);
                
                TableSchema.TableColumn colvarTypeOfBuyName = new TableSchema.TableColumn(schema);
                colvarTypeOfBuyName.ColumnName = "TypeOfBuyName";
                colvarTypeOfBuyName.DataType = DbType.AnsiString;
                colvarTypeOfBuyName.MaxLength = -1;
                colvarTypeOfBuyName.AutoIncrement = false;
                colvarTypeOfBuyName.IsNullable = true;
                colvarTypeOfBuyName.IsPrimaryKey = false;
                colvarTypeOfBuyName.IsForeignKey = false;
                colvarTypeOfBuyName.IsReadOnly = false;
                
                schema.Columns.Add(colvarTypeOfBuyName);
                
                TableSchema.TableColumn colvarProdVersionCode = new TableSchema.TableColumn(schema);
                colvarProdVersionCode.ColumnName = "ProdVersionCode";
                colvarProdVersionCode.DataType = DbType.Int32;
                colvarProdVersionCode.MaxLength = 0;
                colvarProdVersionCode.AutoIncrement = false;
                colvarProdVersionCode.IsNullable = true;
                colvarProdVersionCode.IsPrimaryKey = false;
                colvarProdVersionCode.IsForeignKey = false;
                colvarProdVersionCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarProdVersionCode);
                
                TableSchema.TableColumn colvarProdVersionName = new TableSchema.TableColumn(schema);
                colvarProdVersionName.ColumnName = "ProdVersionName";
                colvarProdVersionName.DataType = DbType.AnsiString;
                colvarProdVersionName.MaxLength = -1;
                colvarProdVersionName.AutoIncrement = false;
                colvarProdVersionName.IsNullable = true;
                colvarProdVersionName.IsPrimaryKey = false;
                colvarProdVersionName.IsForeignKey = false;
                colvarProdVersionName.IsReadOnly = false;
                
                schema.Columns.Add(colvarProdVersionName);
                
                TableSchema.TableColumn colvarProductCode = new TableSchema.TableColumn(schema);
                colvarProductCode.ColumnName = "ProductCode";
                colvarProductCode.DataType = DbType.Int32;
                colvarProductCode.MaxLength = 0;
                colvarProductCode.AutoIncrement = false;
                colvarProductCode.IsNullable = true;
                colvarProductCode.IsPrimaryKey = false;
                colvarProductCode.IsForeignKey = false;
                colvarProductCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarProductCode);
                
                TableSchema.TableColumn colvarProductName = new TableSchema.TableColumn(schema);
                colvarProductName.ColumnName = "ProductName";
                colvarProductName.DataType = DbType.AnsiString;
                colvarProductName.MaxLength = -1;
                colvarProductName.AutoIncrement = false;
                colvarProductName.IsNullable = true;
                colvarProductName.IsPrimaryKey = false;
                colvarProductName.IsForeignKey = false;
                colvarProductName.IsReadOnly = false;
                
                schema.Columns.Add(colvarProductName);
                
                TableSchema.TableColumn colvarConstant1 = new TableSchema.TableColumn(schema);
                colvarConstant1.ColumnName = "Constant1";
                colvarConstant1.DataType = DbType.AnsiString;
                colvarConstant1.MaxLength = -1;
                colvarConstant1.AutoIncrement = false;
                colvarConstant1.IsNullable = true;
                colvarConstant1.IsPrimaryKey = false;
                colvarConstant1.IsForeignKey = false;
                colvarConstant1.IsReadOnly = false;
                
                schema.Columns.Add(colvarConstant1);
                
                TableSchema.TableColumn colvarConstant2 = new TableSchema.TableColumn(schema);
                colvarConstant2.ColumnName = "Constant2";
                colvarConstant2.DataType = DbType.AnsiString;
                colvarConstant2.MaxLength = -1;
                colvarConstant2.AutoIncrement = false;
                colvarConstant2.IsNullable = true;
                colvarConstant2.IsPrimaryKey = false;
                colvarConstant2.IsForeignKey = false;
                colvarConstant2.IsReadOnly = false;
                
                schema.Columns.Add(colvarConstant2);
                
                TableSchema.TableColumn colvarCategoryCode = new TableSchema.TableColumn(schema);
                colvarCategoryCode.ColumnName = "CategoryCode";
                colvarCategoryCode.DataType = DbType.Int32;
                colvarCategoryCode.MaxLength = 0;
                colvarCategoryCode.AutoIncrement = false;
                colvarCategoryCode.IsNullable = true;
                colvarCategoryCode.IsPrimaryKey = false;
                colvarCategoryCode.IsForeignKey = false;
                colvarCategoryCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarCategoryCode);
                
                TableSchema.TableColumn colvarCategoryName = new TableSchema.TableColumn(schema);
                colvarCategoryName.ColumnName = "CategoryName";
                colvarCategoryName.DataType = DbType.AnsiString;
                colvarCategoryName.MaxLength = -1;
                colvarCategoryName.AutoIncrement = false;
                colvarCategoryName.IsNullable = true;
                colvarCategoryName.IsPrimaryKey = false;
                colvarCategoryName.IsForeignKey = false;
                colvarCategoryName.IsReadOnly = false;
                
                schema.Columns.Add(colvarCategoryName);
                
                TableSchema.TableColumn colvarSubSectorCode = new TableSchema.TableColumn(schema);
                colvarSubSectorCode.ColumnName = "SubSectorCode";
                colvarSubSectorCode.DataType = DbType.Int32;
                colvarSubSectorCode.MaxLength = 0;
                colvarSubSectorCode.AutoIncrement = false;
                colvarSubSectorCode.IsNullable = true;
                colvarSubSectorCode.IsPrimaryKey = false;
                colvarSubSectorCode.IsForeignKey = false;
                colvarSubSectorCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarSubSectorCode);
                
                TableSchema.TableColumn colvarSubSectorName = new TableSchema.TableColumn(schema);
                colvarSubSectorName.ColumnName = "SubSectorName";
                colvarSubSectorName.DataType = DbType.AnsiString;
                colvarSubSectorName.MaxLength = -1;
                colvarSubSectorName.AutoIncrement = false;
                colvarSubSectorName.IsNullable = true;
                colvarSubSectorName.IsPrimaryKey = false;
                colvarSubSectorName.IsForeignKey = false;
                colvarSubSectorName.IsReadOnly = false;
                
                schema.Columns.Add(colvarSubSectorName);
                
                TableSchema.TableColumn colvarSectorCode = new TableSchema.TableColumn(schema);
                colvarSectorCode.ColumnName = "SectorCode";
                colvarSectorCode.DataType = DbType.Int32;
                colvarSectorCode.MaxLength = 0;
                colvarSectorCode.AutoIncrement = false;
                colvarSectorCode.IsNullable = true;
                colvarSectorCode.IsPrimaryKey = false;
                colvarSectorCode.IsForeignKey = false;
                colvarSectorCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarSectorCode);
                
                TableSchema.TableColumn colvarSectorName = new TableSchema.TableColumn(schema);
                colvarSectorName.ColumnName = "SectorName";
                colvarSectorName.DataType = DbType.AnsiString;
                colvarSectorName.MaxLength = -1;
                colvarSectorName.AutoIncrement = false;
                colvarSectorName.IsNullable = true;
                colvarSectorName.IsPrimaryKey = false;
                colvarSectorName.IsForeignKey = false;
                colvarSectorName.IsReadOnly = false;
                
                schema.Columns.Add(colvarSectorName);
                
                TableSchema.TableColumn colvarConstant3 = new TableSchema.TableColumn(schema);
                colvarConstant3.ColumnName = "Constant3";
                colvarConstant3.DataType = DbType.AnsiString;
                colvarConstant3.MaxLength = -1;
                colvarConstant3.AutoIncrement = false;
                colvarConstant3.IsNullable = true;
                colvarConstant3.IsPrimaryKey = false;
                colvarConstant3.IsForeignKey = false;
                colvarConstant3.IsReadOnly = false;
                
                schema.Columns.Add(colvarConstant3);
                
                TableSchema.TableColumn colvarBrandCode = new TableSchema.TableColumn(schema);
                colvarBrandCode.ColumnName = "BrandCode";
                colvarBrandCode.DataType = DbType.Int32;
                colvarBrandCode.MaxLength = 0;
                colvarBrandCode.AutoIncrement = false;
                colvarBrandCode.IsNullable = true;
                colvarBrandCode.IsPrimaryKey = false;
                colvarBrandCode.IsForeignKey = false;
                colvarBrandCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarBrandCode);
                
                TableSchema.TableColumn colvarBrandName = new TableSchema.TableColumn(schema);
                colvarBrandName.ColumnName = "BrandName";
                colvarBrandName.DataType = DbType.AnsiString;
                colvarBrandName.MaxLength = -1;
                colvarBrandName.AutoIncrement = false;
                colvarBrandName.IsNullable = true;
                colvarBrandName.IsPrimaryKey = false;
                colvarBrandName.IsForeignKey = false;
                colvarBrandName.IsReadOnly = false;
                
                schema.Columns.Add(colvarBrandName);
                
                TableSchema.TableColumn colvarAdvertiserCode = new TableSchema.TableColumn(schema);
                colvarAdvertiserCode.ColumnName = "AdvertiserCode";
                colvarAdvertiserCode.DataType = DbType.Int32;
                colvarAdvertiserCode.MaxLength = 0;
                colvarAdvertiserCode.AutoIncrement = false;
                colvarAdvertiserCode.IsNullable = true;
                colvarAdvertiserCode.IsPrimaryKey = false;
                colvarAdvertiserCode.IsForeignKey = false;
                colvarAdvertiserCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarAdvertiserCode);
                
                TableSchema.TableColumn colvarAdvertiserName = new TableSchema.TableColumn(schema);
                colvarAdvertiserName.ColumnName = "AdvertiserName";
                colvarAdvertiserName.DataType = DbType.AnsiString;
                colvarAdvertiserName.MaxLength = -1;
                colvarAdvertiserName.AutoIncrement = false;
                colvarAdvertiserName.IsNullable = true;
                colvarAdvertiserName.IsPrimaryKey = false;
                colvarAdvertiserName.IsForeignKey = false;
                colvarAdvertiserName.IsReadOnly = false;
                
                schema.Columns.Add(colvarAdvertiserName);
                
                TableSchema.TableColumn colvarConstant4 = new TableSchema.TableColumn(schema);
                colvarConstant4.ColumnName = "Constant4";
                colvarConstant4.DataType = DbType.AnsiString;
                colvarConstant4.MaxLength = -1;
                colvarConstant4.AutoIncrement = false;
                colvarConstant4.IsNullable = true;
                colvarConstant4.IsPrimaryKey = false;
                colvarConstant4.IsForeignKey = false;
                colvarConstant4.IsReadOnly = false;
                
                schema.Columns.Add(colvarConstant4);
                
                TableSchema.TableColumn colvarAgencyCode = new TableSchema.TableColumn(schema);
                colvarAgencyCode.ColumnName = "AgencyCode";
                colvarAgencyCode.DataType = DbType.Int32;
                colvarAgencyCode.MaxLength = 0;
                colvarAgencyCode.AutoIncrement = false;
                colvarAgencyCode.IsNullable = true;
                colvarAgencyCode.IsPrimaryKey = false;
                colvarAgencyCode.IsForeignKey = false;
                colvarAgencyCode.IsReadOnly = false;
                
                schema.Columns.Add(colvarAgencyCode);
                
                TableSchema.TableColumn colvarAgencyName = new TableSchema.TableColumn(schema);
                colvarAgencyName.ColumnName = "AgencyName";
                colvarAgencyName.DataType = DbType.AnsiString;
                colvarAgencyName.MaxLength = -1;
                colvarAgencyName.AutoIncrement = false;
                colvarAgencyName.IsNullable = true;
                colvarAgencyName.IsPrimaryKey = false;
                colvarAgencyName.IsForeignKey = false;
                colvarAgencyName.IsReadOnly = false;
                
                schema.Columns.Add(colvarAgencyName);
                
                
                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["Adex"].AddSchema("vCommercialLog1",schema);
            }
        }
        #endregion
        
        #region Query Accessor
	    public static Query CreateQuery()
	    {
		    return new Query(Schema);
	    }
	    #endregion
	    
	    #region .ctors
	    public VCommercialLog1()
	    {
            SetSQLProps();
            SetDefaults();
            MarkNew();
        }
        public VCommercialLog1(bool useDatabaseDefaults)
	    {
		    SetSQLProps();
		    if(useDatabaseDefaults)
		    {
				ForceDefaults();
			}
			MarkNew();
	    }
	    
	    public VCommercialLog1(object keyID)
	    {
		    SetSQLProps();
		    LoadByKey(keyID);
	    }
    	 
	    public VCommercialLog1(string columnName, object columnValue)
        {
            SetSQLProps();
            LoadByParam(columnName,columnValue);
        }
        
	    #endregion
	    
	    #region Props
	    
          
        [XmlAttribute("MediaCode")]
        [Bindable(true)]
        public int? MediaCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("MediaCode");
		    }
            set 
		    {
			    SetColumnValue("MediaCode", value);
            }
        }
	      
        [XmlAttribute("RFDate")]
        [Bindable(true)]
        public long? RFDate 
	    {
		    get
		    {
			    return GetColumnValue<long?>("RFDate");
		    }
            set 
		    {
			    SetColumnValue("RFDate", value);
            }
        }
	      
        [XmlAttribute("TimeStart")]
        [Bindable(true)]
        public int? TimeStart 
	    {
		    get
		    {
			    return GetColumnValue<int?>("TimeStart");
		    }
            set 
		    {
			    SetColumnValue("TimeStart", value);
            }
        }
	      
        [XmlAttribute("TimeEnd")]
        [Bindable(true)]
        public int? TimeEnd 
	    {
		    get
		    {
			    return GetColumnValue<int?>("TimeEnd");
		    }
            set 
		    {
			    SetColumnValue("TimeEnd", value);
            }
        }
	      
        [XmlAttribute("Duration")]
        [Bindable(true)]
        public int? Duration 
	    {
		    get
		    {
			    return GetColumnValue<int?>("Duration");
		    }
            set 
		    {
			    SetColumnValue("Duration", value);
            }
        }
	      
        [XmlAttribute("ProgramCode")]
        [Bindable(true)]
        public int? ProgramCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("ProgramCode");
		    }
            set 
		    {
			    SetColumnValue("ProgramCode", value);
            }
        }
	      
        [XmlAttribute("ProgramName")]
        [Bindable(true)]
        public string ProgramName 
	    {
		    get
		    {
			    return GetColumnValue<string>("ProgramName");
		    }
            set 
		    {
			    SetColumnValue("ProgramName", value);
            }
        }
	      
        [XmlAttribute("Typology")]
        [Bindable(true)]
        public string Typology 
	    {
		    get
		    {
			    return GetColumnValue<string>("Typology");
		    }
            set 
		    {
			    SetColumnValue("Typology", value);
            }
        }
	      
        [XmlAttribute("NominalCost")]
        [Bindable(true)]
        public decimal? NominalCost 
	    {
		    get
		    {
			    return GetColumnValue<decimal?>("NominalCost");
		    }
            set 
		    {
			    SetColumnValue("NominalCost", value);
            }
        }
	      
        [XmlAttribute("RealCost")]
        [Bindable(true)]
        public decimal? RealCost 
	    {
		    get
		    {
			    return GetColumnValue<decimal?>("RealCost");
		    }
            set 
		    {
			    SetColumnValue("RealCost", value);
            }
        }
	      
        [XmlAttribute("PositionInBreak")]
        [Bindable(true)]
        public int? PositionInBreak 
	    {
		    get
		    {
			    return GetColumnValue<int?>("PositionInBreak");
		    }
            set 
		    {
			    SetColumnValue("PositionInBreak", value);
            }
        }
	      
        [XmlAttribute("NumberOfSpotsInBreak")]
        [Bindable(true)]
        public string NumberOfSpotsInBreak 
	    {
		    get
		    {
			    return GetColumnValue<string>("NumberOfSpotsInBreak");
		    }
            set 
		    {
			    SetColumnValue("NumberOfSpotsInBreak", value);
            }
        }
	      
        [XmlAttribute("TypeOfSpot")]
        [Bindable(true)]
        public int? TypeOfSpot 
	    {
		    get
		    {
			    return GetColumnValue<int?>("TypeOfSpot");
		    }
            set 
		    {
			    SetColumnValue("TypeOfSpot", value);
            }
        }
	      
        [XmlAttribute("TypeOfBuyCode")]
        [Bindable(true)]
        public int? TypeOfBuyCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("TypeOfBuyCode");
		    }
            set 
		    {
			    SetColumnValue("TypeOfBuyCode", value);
            }
        }
	      
        [XmlAttribute("TypeOfBuyName")]
        [Bindable(true)]
        public string TypeOfBuyName 
	    {
		    get
		    {
			    return GetColumnValue<string>("TypeOfBuyName");
		    }
            set 
		    {
			    SetColumnValue("TypeOfBuyName", value);
            }
        }
	      
        [XmlAttribute("ProdVersionCode")]
        [Bindable(true)]
        public int? ProdVersionCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("ProdVersionCode");
		    }
            set 
		    {
			    SetColumnValue("ProdVersionCode", value);
            }
        }
	      
        [XmlAttribute("ProdVersionName")]
        [Bindable(true)]
        public string ProdVersionName 
	    {
		    get
		    {
			    return GetColumnValue<string>("ProdVersionName");
		    }
            set 
		    {
			    SetColumnValue("ProdVersionName", value);
            }
        }
	      
        [XmlAttribute("ProductCode")]
        [Bindable(true)]
        public int? ProductCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("ProductCode");
		    }
            set 
		    {
			    SetColumnValue("ProductCode", value);
            }
        }
	      
        [XmlAttribute("ProductName")]
        [Bindable(true)]
        public string ProductName 
	    {
		    get
		    {
			    return GetColumnValue<string>("ProductName");
		    }
            set 
		    {
			    SetColumnValue("ProductName", value);
            }
        }
	      
        [XmlAttribute("Constant1")]
        [Bindable(true)]
        public string Constant1 
	    {
		    get
		    {
			    return GetColumnValue<string>("Constant1");
		    }
            set 
		    {
			    SetColumnValue("Constant1", value);
            }
        }
	      
        [XmlAttribute("Constant2")]
        [Bindable(true)]
        public string Constant2 
	    {
		    get
		    {
			    return GetColumnValue<string>("Constant2");
		    }
            set 
		    {
			    SetColumnValue("Constant2", value);
            }
        }
	      
        [XmlAttribute("CategoryCode")]
        [Bindable(true)]
        public int? CategoryCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("CategoryCode");
		    }
            set 
		    {
			    SetColumnValue("CategoryCode", value);
            }
        }
	      
        [XmlAttribute("CategoryName")]
        [Bindable(true)]
        public string CategoryName 
	    {
		    get
		    {
			    return GetColumnValue<string>("CategoryName");
		    }
            set 
		    {
			    SetColumnValue("CategoryName", value);
            }
        }
	      
        [XmlAttribute("SubSectorCode")]
        [Bindable(true)]
        public int? SubSectorCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("SubSectorCode");
		    }
            set 
		    {
			    SetColumnValue("SubSectorCode", value);
            }
        }
	      
        [XmlAttribute("SubSectorName")]
        [Bindable(true)]
        public string SubSectorName 
	    {
		    get
		    {
			    return GetColumnValue<string>("SubSectorName");
		    }
            set 
		    {
			    SetColumnValue("SubSectorName", value);
            }
        }
	      
        [XmlAttribute("SectorCode")]
        [Bindable(true)]
        public int? SectorCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("SectorCode");
		    }
            set 
		    {
			    SetColumnValue("SectorCode", value);
            }
        }
	      
        [XmlAttribute("SectorName")]
        [Bindable(true)]
        public string SectorName 
	    {
		    get
		    {
			    return GetColumnValue<string>("SectorName");
		    }
            set 
		    {
			    SetColumnValue("SectorName", value);
            }
        }
	      
        [XmlAttribute("Constant3")]
        [Bindable(true)]
        public string Constant3 
	    {
		    get
		    {
			    return GetColumnValue<string>("Constant3");
		    }
            set 
		    {
			    SetColumnValue("Constant3", value);
            }
        }
	      
        [XmlAttribute("BrandCode")]
        [Bindable(true)]
        public int? BrandCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("BrandCode");
		    }
            set 
		    {
			    SetColumnValue("BrandCode", value);
            }
        }
	      
        [XmlAttribute("BrandName")]
        [Bindable(true)]
        public string BrandName 
	    {
		    get
		    {
			    return GetColumnValue<string>("BrandName");
		    }
            set 
		    {
			    SetColumnValue("BrandName", value);
            }
        }
	      
        [XmlAttribute("AdvertiserCode")]
        [Bindable(true)]
        public int? AdvertiserCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("AdvertiserCode");
		    }
            set 
		    {
			    SetColumnValue("AdvertiserCode", value);
            }
        }
	      
        [XmlAttribute("AdvertiserName")]
        [Bindable(true)]
        public string AdvertiserName 
	    {
		    get
		    {
			    return GetColumnValue<string>("AdvertiserName");
		    }
            set 
		    {
			    SetColumnValue("AdvertiserName", value);
            }
        }
	      
        [XmlAttribute("Constant4")]
        [Bindable(true)]
        public string Constant4 
	    {
		    get
		    {
			    return GetColumnValue<string>("Constant4");
		    }
            set 
		    {
			    SetColumnValue("Constant4", value);
            }
        }
	      
        [XmlAttribute("AgencyCode")]
        [Bindable(true)]
        public int? AgencyCode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("AgencyCode");
		    }
            set 
		    {
			    SetColumnValue("AgencyCode", value);
            }
        }
	      
        [XmlAttribute("AgencyName")]
        [Bindable(true)]
        public string AgencyName 
	    {
		    get
		    {
			    return GetColumnValue<string>("AgencyName");
		    }
            set 
		    {
			    SetColumnValue("AgencyName", value);
            }
        }
	    
	    #endregion
    
	    #region Columns Struct
	    public struct Columns
	    {
		    
		    
            public static string MediaCode = @"MediaCode";
            
            public static string RFDate = @"RFDate";
            
            public static string TimeStart = @"TimeStart";
            
            public static string TimeEnd = @"TimeEnd";
            
            public static string Duration = @"Duration";
            
            public static string ProgramCode = @"ProgramCode";
            
            public static string ProgramName = @"ProgramName";
            
            public static string Typology = @"Typology";
            
            public static string NominalCost = @"NominalCost";
            
            public static string RealCost = @"RealCost";
            
            public static string PositionInBreak = @"PositionInBreak";
            
            public static string NumberOfSpotsInBreak = @"NumberOfSpotsInBreak";
            
            public static string TypeOfSpot = @"TypeOfSpot";
            
            public static string TypeOfBuyCode = @"TypeOfBuyCode";
            
            public static string TypeOfBuyName = @"TypeOfBuyName";
            
            public static string ProdVersionCode = @"ProdVersionCode";
            
            public static string ProdVersionName = @"ProdVersionName";
            
            public static string ProductCode = @"ProductCode";
            
            public static string ProductName = @"ProductName";
            
            public static string Constant1 = @"Constant1";
            
            public static string Constant2 = @"Constant2";
            
            public static string CategoryCode = @"CategoryCode";
            
            public static string CategoryName = @"CategoryName";
            
            public static string SubSectorCode = @"SubSectorCode";
            
            public static string SubSectorName = @"SubSectorName";
            
            public static string SectorCode = @"SectorCode";
            
            public static string SectorName = @"SectorName";
            
            public static string Constant3 = @"Constant3";
            
            public static string BrandCode = @"BrandCode";
            
            public static string BrandName = @"BrandName";
            
            public static string AdvertiserCode = @"AdvertiserCode";
            
            public static string AdvertiserName = @"AdvertiserName";
            
            public static string Constant4 = @"Constant4";
            
            public static string AgencyCode = @"AgencyCode";
            
            public static string AgencyName = @"AgencyName";
            
	    }
	    #endregion
	    
	    
	    #region IAbstractRecord Members
        public new CT GetColumnValue<CT>(string columnName) {
            return base.GetColumnValue<CT>(columnName);
        }
        public object GetColumnValue(string columnName) {
            return base.GetColumnValue<object>(columnName);
        }
        #endregion
	    
    }
}
